# -*- coding: utf-8 -*-
#
# Author:: Jonny
# Date:: 2018/12/4
import logging.handlers

from compat.PROJECT_PATH import PROJECT_PATH

print(PROJECT_PATH)

log_conf = {
    "level": logging.INFO,
    "format": '%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
    "datefmt": '%Y-%m-%d %H:%M:%S',
    "mode": "a",
    "handlers": {
        "StreamHandler": True,
        "TimedRotatingFileHandler": {
            "filename": PROJECT_PATH + "\\log\\" + "common.log",
            "when": "D",
            "interval": 1,
            "backupCount": 3,
            "encoding": "utf-8",
            "delay": False,
            "utc": False,
            "atTime": None

        }
    }
}

log_conf_RotatingFileHandler = {
    "level": logging.INFO,
    "format": '%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
    "datefmt": '%Y-%m-%d %H:%M:%S',
    "handlers": {
        "StreamHandler": True,
        "RotatingFileHandler": {
            "filename": "common.log",
            "mode": "a",
            "maxBytes": 1024 * 1024,
            "backupCount": 3,
            "encoding": "utf-8",
            "delay": False
        }

    }
}

if __name__ == "__main__":
    print("test")
    print(PROJECT_PATH)
